3.91 \(\int \frac {\tan (x)}{\sqrt {1-\cos ^2(x)}} \, dx\)

Optimal. Leaf size=9 \[ \tanh ^{-1}\left (\sqrt {\sin ^2(x)}\right ) \]

[Out]

arctanh((sin(x)^2)^(1/2))

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {3176, 3205, 63, 206} \[ \tanh ^{-1}\left (\sqrt {\sin ^2(x)}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]/Sqrt[1 - Cos[x]^2],x]

[Out]

ArcTanh[Sqrt[Sin[x]^2]]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3176

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*cos[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rule 3205

Int[((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = FreeFact
ors[Sin[e + f*x]^2, x]}, Dist[ff^((m + 1)/2)/(2*f), Subst[Int[(x^((m - 1)/2)*(b*ff^(n/2)*x^(n/2))^p)/(1 - ff*x
)^((m + 1)/2), x], x, Sin[e + f*x]^2/ff], x]] /; FreeQ[{b, e, f, p}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2
]

Rubi steps

\begin {align*} \int \frac {\tan (x)}{\sqrt {1-\cos ^2(x)}} \, dx &=\int \frac {\tan (x)}{\sqrt {\sin ^2(x)}} \, dx\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{(1-x) \sqrt {x}} \, dx,x,\sin ^2(x)\right )\\ &=\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sqrt {\sin ^2(x)}\right )\\ &=\tanh ^{-1}\left (\sqrt {\sin ^2(x)}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.02, size = 44, normalized size = 4.89 \[ \frac {\sin (x) \left (\log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )\right )}{\sqrt {\sin ^2(x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]/Sqrt[1 - Cos[x]^2],x]

[Out]

((-Log[Cos[x/2] - Sin[x/2]] + Log[Cos[x/2] + Sin[x/2]])*Sin[x])/Sqrt[Sin[x]^2]

________________________________________________________________________________________

fricas [B]  time = 0.64, size = 17, normalized size = 1.89 \[ \frac {1}{2} \, \log \left (\sin \relax (x) + 1\right ) - \frac {1}{2} \, \log \left (-\sin \relax (x) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(1-cos(x)^2)^(1/2),x, algorithm="fricas")

[Out]

1/2*log(sin(x) + 1) - 1/2*log(-sin(x) + 1)

________________________________________________________________________________________

giac [B]  time = 0.34, size = 33, normalized size = 3.67 \[ \frac {1}{2} \, \log \left (\sqrt {-\cos \relax (x)^{2} + 1} + 1\right ) - \frac {1}{2} \, \log \left (-\sqrt {-\cos \relax (x)^{2} + 1} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(1-cos(x)^2)^(1/2),x, algorithm="giac")

[Out]

1/2*log(sqrt(-cos(x)^2 + 1) + 1) - 1/2*log(-sqrt(-cos(x)^2 + 1) + 1)

________________________________________________________________________________________

maple [A]  time = 0.44, size = 8, normalized size = 0.89 \[ \arctanh \left (\frac {2}{\sqrt {2-2 \cos \left (2 x \right )}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)/(1-cos(x)^2)^(1/2),x)

[Out]

arctanh(1/(sin(x)^2)^(1/2))

________________________________________________________________________________________

maxima [B]  time = 0.58, size = 39, normalized size = 4.33 \[ \frac {1}{2} \, \left (-1\right )^{2 \, \sin \relax (x)} \log \left (-\frac {\sin \relax (x)}{\sin \relax (x) + 1}\right ) + \frac {1}{2} \, \left (-1\right )^{2 \, \sin \relax (x)} \log \left (-\frac {\sin \relax (x)}{\sin \relax (x) - 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(1-cos(x)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*(-1)^(2*sin(x))*log(-sin(x)/(sin(x) + 1)) + 1/2*(-1)^(2*sin(x))*log(-sin(x)/(sin(x) - 1))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.11 \[ \int \frac {\mathrm {tan}\relax (x)}{\sqrt {1-{\cos \relax (x)}^2}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)/(1 - cos(x)^2)^(1/2),x)

[Out]

int(tan(x)/(1 - cos(x)^2)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan {\relax (x )}}{\sqrt {- \left (\cos {\relax (x )} - 1\right ) \left (\cos {\relax (x )} + 1\right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(1-cos(x)**2)**(1/2),x)

[Out]

Integral(tan(x)/sqrt(-(cos(x) - 1)*(cos(x) + 1)), x)

________________________________________________________________________________________